#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("del.in" , "r" , stdin);
	freopen("del.out" , "w" , stdout);
	int n , x , h[1010];
	cin >> n >> x;
	int i = 1;
	while(i <= n){
		cin >> h[i];
		if(h[i] == x){
			i = i + 1;
			continue;
		}
		cout << h[i] << " ";
		i = i + 1;
	}
	return 0;
}